package com.ruoyi.salary.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.salary.mapper.SalaryMapper;
import com.ruoyi.salary.domain.Salary;
import com.ruoyi.salary.service.ISalaryService;

/**
 * 员工工资Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-02
 */
@Service
public class SalaryServiceImpl implements ISalaryService 
{
    @Autowired
    private SalaryMapper salaryMapper;

    /**
     * 查询员工工资
     * 
     * @param employeeId 员工工资主键
     * @return 员工工资
     */
    @Override
    public Salary selectSalaryByEmployeeId(Long employeeId)
    {
        return salaryMapper.selectSalaryByEmployeeId(employeeId);
    }

    /**
     * 查询员工工资列表
     * 
     * @param salary 员工工资
     * @return 员工工资
     */
    @Override
    public List<Salary> selectSalaryList(Salary salary)
    {
        return salaryMapper.selectSalaryList(salary);
    }

    /**
     * 新增员工工资
     * 
     * @param salary 员工工资
     * @return 结果
     */
    @Override
    public int insertSalary(Salary salary)
    {
        return salaryMapper.insertSalary(salary);
    }

    /**
     * 修改员工工资
     * 
     * @param salary 员工工资
     * @return 结果
     */
    @Override
    public int updateSalary(Salary salary)
    {
        return salaryMapper.updateSalary(salary);
    }

    /**
     * 批量删除员工工资
     * 
     * @param employeeIds 需要删除的员工工资主键
     * @return 结果
     */
    @Override
    public int deleteSalaryByEmployeeIds(Long[] employeeIds)
    {
        return salaryMapper.deleteSalaryByEmployeeIds(employeeIds);
    }

    /**
     * 删除员工工资信息
     * 
     * @param employeeId 员工工资主键
     * @return 结果
     */
    @Override
    public int deleteSalaryByEmployeeId(Long employeeId)
    {
        return salaryMapper.deleteSalaryByEmployeeId(employeeId);
    }
}
